<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE HTML>
<html>
  <head>
  
    <title>My JSP 'update.jsp' starting page</title>

  </head>
  
  <body>
     <div>
     	<h2>修改图书</h2>
    	<form action="update" method="post">
    		<table>
    			<input type="hidden" name="id" value="${book.id }"/>
    			<tr>
    				<td>书名</td>
    				<td><input type="text" name="name" value="${book.name }"/></td>
    			</tr>
    			<tr>
    				<td>作者</td>
    				<td><input type="text" name="author" value="${book.author }"/></td>
    			</tr>
    			<tr>
    				<td>出版社</td>
    				<td><input type="text" name="publish" value="${book.publish }"/></td>
    			</tr>
    			<tr>
    				<td>出版日期</td>
    				<td><input type="text" name="publishdate" value="<fmt:formatDate value="${book.publishdate }"  pattern="yyyy-MM-dd"/>"/></td>
    			</tr>
    			<tr>
    				<td>页数</td>
    				<td><input type="text" name="page" value="${book.page }"/></td>
    			</tr>
    			<tr>
    				<td>价格</td>
    				<td><input type="text" name="price" value="${book.price }"/></td>
    			</tr>
    			<tr>
    				<td>内容摘要</td>
    				<td><input type="text" name="content" value="${book.content }"/></td>
    			</tr>
    			<tr><td colspan="7">
    				<input type="submit" value="提交"/>
    				<a href="${pageContext.request.contextPath }/list"><input type="button" value="返回"/></a>
    			</td></tr>
    		</table>
    	</form>
    </div>
  </body>
</html>
